import service from '@/api/request/request'

export function login (data) {
  return service({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function searchUsers (params) {
  return service({
    url: '/user/search',
    method: 'get',
    params: params
  })
}

export function getResetEmail (params) {
  return service({
    url: '/user/password/reset/email',
    method: 'get',
    params: params
  })
}

export function resetPassword (data) {
  return service({
    url: '/user/password/reset',
    method: 'post',
    data
  })
}

export function resetPasswordAfterLogin (data) {
  return service({
    url: '/user/password/reset/auth',
    method: 'post',
    data
  })
}

export function getRegisterEmail (params) {
  return service({
    url: '/user/register/validate',
    method: 'get',
    params
  })
}

export function register (data) {
  return service({
    url: '/user/register',
    method: 'post',
    data
  })
}

export function getUserEmail (params) {
  return service({
    url: '/user/get/id',
    method: 'get',
    params
  })
}
